﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Reflection;
using System.ComponentModel.Composition;
using EpubFactory.Robot.UI;
using EpubFactory.Zhuishu.UI;
using EpubFactory.Lib99.Service;


namespace EpubFactory.Robot
{
    public partial class MainForm : Form
    {

        public MainForm()
        {
            InitializeComponent();
        }

        private void btnLib99_Click(object sender, EventArgs e)
        {
            var form = new Lib99.MainForm(new Lib99Receipe());
            form.ShowDialog();
        }

        private void btnZhuishu_Click(object sender, EventArgs e)
        {
            var form = new SearchForm();
            form.ShowDialog();
        }

        private void optionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new OptionForm();
            form.ShowDialog();
        }

        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new ReadmeForm();
            form.Show();
        }

        private void updateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new UpdateForm();
            form.ShowDialog();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new AboutForm();
            form.ShowDialog();
        }

        private void coverOptionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new CoverOptionForm();
            form.ShowDialog();
        }

        private void btnSm_Click(object sender, EventArgs e)
        {

        }

        private void btnMsdn_Click(object sender, EventArgs e)
        {

        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            ToolTip btnTip = new ToolTip();

            btnTip.AutoPopDelay = 5000;
            btnTip.InitialDelay = 1000;
            btnTip.ReshowDelay = 500;

            btnTip.SetToolTip(this.btnLib99, "http://www.99lib.net");
            btnTip.SetToolTip(this.btnZhuishu, "http://www.zhuishushenqi.com");
            btnTip.SetToolTip(this.btnLiewen, "http://liewen.cc");
            btnTip.SetToolTip(this.btnBiquge, "http://www.biquge.lu/");
        }

        private void btnLiewen_Click(object sender, EventArgs e)
        {
            var form = new Lib99.MainForm(new LiewenReceipe());
            form.ShowDialog();
        }

        private void btnBiquge_Click(object sender, EventArgs e)
        {
            var form = new Lib99.MainForm(new BiqugeReceipe());
            form.ShowDialog();
        }
    }
}
